<template>
  <div class="main-container">
   <div class="header">

     <span style="margin-left: 10px">编辑初始设置</span>
   </div>


    <div class="content">
      <div class="form-item" style="margin-top: 10px">
        <div class="title">名称：</div>
        <div class="form-name">
          自定义初始设置1
        </div>
      </div>
      <div class="form-item" style="margin-top: 24px">
        <div class="headline">瞳孔</div>
        <div class="form-button">
           <div :class="['button', {isSelect: index === 1}]" @click="handleSelect(1)" >
             正常
           </div>
          <div :class="['button', {isSelect: index === 2}]"  @click="handleSelect(2)">
            正常
          </div>
          <div :class="['button', {isSelect: index === 3}]"  @click="handleSelect(3)">
            正常
          </div>
        </div>
      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">对光反射</div>
        <div class="form-switch">
          <div class="switch">
            直接
            <el-switch
                style="margin-left: 13px"
                v-model="value1"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
          <div class="switch">
            直接
            <el-switch
                style="margin-left: 13px"
                v-model="value2"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

        </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">胸廓起伏</div>
        <div class="form-switch">
          <div class="switch">
            开启
            <el-switch
                style="margin-left: 13px"
                v-model="value3"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">颈动脉搏动</div>
        <div class="form-switch">
          <div class="switch">
            开启
            <el-switch
                style="margin-left: 13px"
                v-model="value4"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">声音</div>
        <div class="form-switch">
          <div class="switch">
             心音
            <el-switch
                style="margin-left: 13px"
                v-model="value5"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
          <div class="switch">
             呼吸音
            <el-switch
                style="margin-left: 13px"
                v-model="value6"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
          <div class="switch">
            语音识别
            <el-switch
                style="margin-left: 13px"
                v-model="value7"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">语音</div>
        <div class="form-dropdown">
          内置语音XXXXXX
<!--          <div class="switch">-->
<!--            开启-->
<!--            <el-switch-->
<!--                style="margin-left: 13px"-->
<!--                v-model="value4"-->
<!--                active-color="#13ce66"-->
<!--                inactive-color="#ff4949">-->
<!--            </el-switch>-->
<!--          </div>-->
        </div>

      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">CPR节拍器</div>
        <div class="form-switch">
          <div class="switch">
            开启
            <el-switch
                style="margin-left: 13px"
                v-model="value8"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

      </div>
      <div class="form-item" style="margin-top: 20px">
        <div class="headline">CPR提示</div>
        <div class="form-switch">
          <div class="switch">
            开启
            <el-switch
                style="margin-left: 13px"
                v-model="value9"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
          </div>
        </div>

      </div>



      </div>
    <div class="footer">
      <div class="footer-button " style=" border: 1px solid rgba(247,77,46,1);color: #F74D2E;">删除</div>
      <div class="footer-button">取消</div>
      <div class="footer-button">保存</div>
    </div>
  </div>

</template>
<script>
export default {
  name: "EditIndex",
  props:{
    editData: {
      type: Object,
      required: true
    }
  },
  methods: {
    handleSelect(index){
      this.index = index
    }
  },
  created() {
    console.log('editData = ', this.editData)
  },
  data(){
    return {
      index: -1,
      value1: true,
      value2: true,
      value3: true,
      value4: true,
      value5: true,
      value6: true,
      value7: true,
      value8: true,
      value9: true,




    }
  }
}
</script>


<style scoped lang="scss">
.main-container{
  width: 100%;
  height: 100%;
  padding-left: 20px;

  .header{
    height: 50px;
    display: flex;
    align-items: center;
  }
  .content{

    //height: calc(100% - 50px - 72px);
    height: calc(100% - 200px);
    overflow-y: auto;
    .form-item{
      .title{
        font-family: HarmonyOS_Sans_SC;
        font-size: 14px;
        color: #333333;
        letter-spacing: 0.56px;
        font-weight: 400;
      }
      .form-name{
        margin-top: 16px;
        padding: 5px 0px 8px 21px;
        display: flex;

        align-items: center;
        width: 340px;
        height: 32px;
        background: #F3F4F9;
        border: 1px solid rgba(94,105,194,1);
        border-radius: 16px;
      }
      .headline{
        font-family: HarmonyOS_Sans_SC_Medium;
        font-size: 16px;
        color: #333333;
        letter-spacing: 0;
        font-weight: 500;
      }
      .form-button{
        display: flex;
        margin-top: 12px;
        .button{
          font-family: HarmonyOS_Sans_SC;
          font-size: 14px;
          color: #333333;
          letter-spacing: 0;
          text-align: center;
          font-weight: 400;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 120px;
          height: 40px;
          background: #F3F4F9;
          border-radius: 4px;
          &.isSelect {
            background: red;
          }
        }
        //.button + .button {
        //  margin-left: 20px;
        //}
        .button:not(:first-child){
          margin-left: 30px;
        }

      }
      .form-switch{
        display: flex;
        .switch{
          margin-top: 12px;
          font-family: HarmonyOS_Sans_SC;
          font-size: 14px;
          color: #333333;
          letter-spacing: 0;
          font-weight: 400;
          background: #F3F4F9;
          border-radius: 4px;
          width: 120px;
          height: 40px;
          display: flex;
          justify-content: center;
          align-items: center;
        }
      }
      .form-dropdown{
        margin-top: 12px;
        display: flex;
        ont-family: HarmonyOS_Sans_SC;
        font-size: 14px;
        color: #333333;
        letter-spacing: 0.56px;
        font-weight: 400;
        align-items: center;
        padding: 6px 0 7px 12px;
        height: 32px;
        width: 340px;
        background: #F3F4F9;
        border-radius: 4px;
      }

    }

  }
  .footer{
    width: 100%;

    display: flex;
    justify-content: flex-end;
    margin-top: 42px;
    height: 72px;
    .footer-button{
      width: 80px;
      height: 36px;
      background: #FFFFFF;
      border-radius: 18px;
    }
  }
}
//.test-container{
//  width: 100%;
//  height: 50px;
//  border: 1px solid palegoldenrod;
//  color: #000000;
//  overflow-y: auto;
//}
</style>